import type { Airport } from '../airport'
import type { ATSRoute } from '../atsroute'
import type { Entity, Ref } from '../base'
import type { Waypoint } from '../waypoint'

export const RoutingType = 'Routing'

export interface RoutingSegment {
  name: string
  start: Ref<Waypoint>
  end: Ref<Waypoint>
  atsRoute?: Ref<ATSRoute>
}

export interface Routing extends Entity {
  departureAirport?: Ref<Airport>
  arrivalAirport?: Ref<Airport>
  waypointList: Array<Ref<Waypoint>>
  segmentList: RoutingSegment[]
}
